/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../../model/baseModel';

const { adminPath } = useGlobSetting();

export interface QueslibLog extends BasicModel<QueslibLog> {
  [x: string]: any;
  logType?: string; // 日志类型
  fieldName?: string; // 修改字段
  oldValue?: string; // 原始值
  newValue?: string; // 当前值
  createDate?: string; // 创建时间
  quesId?: string; // 问题ID
  caction?: string; // 操作描述
  component?: string; // 组件类型
  dictType?: string; // 字典类型
}

export const queslibLogList = (params?: QueslibLog | any) =>
  defHttp.get<QueslibLog>({ url: adminPath + '/queslib/log/queslibLog/list', params });

export const queslibLogListData = (params?: QueslibLog | any) =>
  defHttp.post<Page<QueslibLog>>({ url: adminPath + '/queslib/log/queslibLog/listData', params });

export const queslibLogForm = (params?: QueslibLog | any) =>
  defHttp.get<QueslibLog>({ url: adminPath + '/queslib/log/queslibLog/form', params });

export const queslibLogSave = (params?: any, data?: QueslibLog | any) =>
  defHttp.postJson<QueslibLog>({ url: adminPath + '/queslib/log/queslibLog/save', params, data });

export const queslibLogDelete = (params?: QueslibLog | any) =>
  defHttp.get<QueslibLog>({ url: adminPath + '/queslib/log/queslibLog/delete', params });
